package com.culturalCenter.dataCenter;

import com.culturalCenter.dataCenter.Utils.MapperUtil;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * @author 16393
 */
@MapperScan("com.culturalCenter.dataCenter.mapper")
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableScheduling
@EnableAsync
@Slf4j
public class DataCenterApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(DataCenterApplication.class, args);
       log.info("客流服务启动成功>>>>>>>>>>>>");
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(DataCenterApplication.class);
    }

    @Bean
    protected MapperUtil getMapperUtil() {
        return MapperUtil.getInstance();
    }

}
